using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using Bussiness.Config;     
using Bussiness.Entity;
namespace Bussiness.ManagerBase
{
                

     public abstract class CmsNewsManagerBase
    {
        public CmsNewsManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity Insert(CmsNewsEntity obj)
        { 
            return (CmsNewsEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity Update(CmsNewsEntity obj)
        { 
            return (CmsNewsEntity)Adapter.Update(obj);             
        }
 
 
        public CmsNewsEntity Delete(CmsNewsEntity obj)
        { 
            return (CmsNewsEntity)Adapter.Delete(obj);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByCategoryId (CmsNewsEntity obj)
        { 
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"CategoryId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CategoryId 
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByCategoryId (Guid CategoryId )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CategoryId = CategoryId;  
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"CategoryId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByCreatedBy (CmsNewsEntity obj)
        { 
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedBy 
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByCreatedBy (string CreatedBy )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CreatedBy = CreatedBy;  
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByCreatedDate (CmsNewsEntity obj)
        { 
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedDate 
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByCreatedDate (DateTime CreatedDate )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CreatedDate = CreatedDate;  
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien History duoc set trong object
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByHistory (CmsNewsEntity obj)
        { 
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"History");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien History 
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByHistory (string History )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.History = History;  
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"History");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteById (CmsNewsEntity obj)
        { 
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"Id");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Id 
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteById (Guid Id )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.Id = Id;  
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"Id");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByIntId (CmsNewsEntity obj)
        { 
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"IntId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IntId 
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByIntId (int IntId )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.IntId = IntId;  
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"IntId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByPhoto (CmsNewsEntity obj)
        { 
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"Photo");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Photo 
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByPhoto (string Photo )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.Photo = Photo;  
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"Photo");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByUpdatedBy (CmsNewsEntity obj)
        { 
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedBy 
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByUpdatedBy (string UpdatedBy )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.UpdatedBy = UpdatedBy;  
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByUpdatedDate (CmsNewsEntity obj)
        { 
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedDate 
        /// </summary>
        /// <returns>CmsNewsEntity</returns>
        public CmsNewsEntity DeleteByUpdatedDate (DateTime UpdatedDate )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.UpdatedDate = UpdatedDate;  
            return (CmsNewsEntity)Adapter.DeleteByField(obj,"UpdatedDate");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public CmsNewsEntity Select(CmsNewsEntity obj)
        { 
            return (CmsNewsEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(CmsNewsEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(CmsNewsEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new CmsNewsEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new CmsNewsEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<CmsNewsEntity> SelectAllLST()
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new CmsNewsEntity()),new CmsNewsEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<CmsNewsEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new CmsNewsEntity(),option),new CmsNewsEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (CmsNewsEntity obj)
        { 
            return Adapter.SelectByField(obj,"CategoryId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (CmsNewsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CategoryId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByCategoryIdLST (CmsNewsEntity obj)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByCategoryIdLST (CmsNewsEntity obj,SelectOptions option)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CategoryId",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (Guid CategoryId )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CategoryId = CategoryId;  
            return Adapter.SelectByField(obj,"CategoryId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (Guid CategoryId, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CategoryId = CategoryId;  
            return Adapter.SelectByField(obj,"CategoryId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByCategoryIdLST (Guid CategoryId )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CategoryId = CategoryId;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByCategoryIdLST (Guid CategoryId, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CategoryId = CategoryId;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (CmsNewsEntity obj)
        { 
            return Adapter.SelectByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (CmsNewsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CreatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByCreatedByLST (CmsNewsEntity obj)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByCreatedByLST (CmsNewsEntity obj,SelectOptions option)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CreatedBy",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (string CreatedBy )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CreatedBy = CreatedBy;  
            return Adapter.SelectByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (string CreatedBy, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CreatedBy = CreatedBy;  
            return Adapter.SelectByField(obj,"CreatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByCreatedByLST (string CreatedBy )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CreatedBy = CreatedBy;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByCreatedByLST (string CreatedBy, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CreatedBy = CreatedBy;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (CmsNewsEntity obj)
        { 
            return Adapter.SelectByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (CmsNewsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CreatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByCreatedDateLST (CmsNewsEntity obj)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByCreatedDateLST (CmsNewsEntity obj,SelectOptions option)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CreatedDate",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (DateTime CreatedDate )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CreatedDate = CreatedDate;  
            return Adapter.SelectByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (DateTime CreatedDate, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CreatedDate = CreatedDate;  
            return Adapter.SelectByField(obj,"CreatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByCreatedDateLST (DateTime CreatedDate )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CreatedDate = CreatedDate;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByCreatedDateLST (DateTime CreatedDate, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.CreatedDate = CreatedDate;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien History duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByHistory (CmsNewsEntity obj)
        { 
            return Adapter.SelectByField(obj,"History");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien History duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByHistory (CmsNewsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"History",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien History duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByHistoryLST (CmsNewsEntity obj)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"History"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien History duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByHistoryLST (CmsNewsEntity obj,SelectOptions option)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"History",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien History 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByHistory (string History )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.History = History;  
            return Adapter.SelectByField(obj,"History");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien History duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByHistory (string History, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.History = History;  
            return Adapter.SelectByField(obj,"History",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien History 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByHistoryLST (string History )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.History = History;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"History"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien History duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByHistoryLST (string History, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.History = History;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"History",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (CmsNewsEntity obj)
        { 
            return Adapter.SelectByField(obj,"Id");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (CmsNewsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Id",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByIdLST (CmsNewsEntity obj)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByIdLST (CmsNewsEntity obj,SelectOptions option)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Id",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Guid Id )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.Id = Id;  
            return Adapter.SelectByField(obj,"Id");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Guid Id, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.Id = Id;  
            return Adapter.SelectByField(obj,"Id",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByIdLST (Guid Id )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.Id = Id;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByIdLST (Guid Id, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.Id = Id;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIntId (CmsNewsEntity obj)
        { 
            return Adapter.SelectByField(obj,"IntId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIntId (CmsNewsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"IntId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByIntIdLST (CmsNewsEntity obj)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IntId"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByIntIdLST (CmsNewsEntity obj,SelectOptions option)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"IntId",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIntId (int IntId )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.IntId = IntId;  
            return Adapter.SelectByField(obj,"IntId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIntId (int IntId, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.IntId = IntId;  
            return Adapter.SelectByField(obj,"IntId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByIntIdLST (int IntId )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.IntId = IntId;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IntId"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IntId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByIntIdLST (int IntId, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.IntId = IntId;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IntId",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (CmsNewsEntity obj)
        { 
            return Adapter.SelectByField(obj,"Photo");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (CmsNewsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Photo",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByPhotoLST (CmsNewsEntity obj)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Photo"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByPhotoLST (CmsNewsEntity obj,SelectOptions option)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Photo",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (string Photo )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.Photo = Photo;  
            return Adapter.SelectByField(obj,"Photo");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (string Photo, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.Photo = Photo;  
            return Adapter.SelectByField(obj,"Photo",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByPhotoLST (string Photo )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.Photo = Photo;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Photo"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByPhotoLST (string Photo, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.Photo = Photo;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Photo",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (CmsNewsEntity obj)
        { 
            return Adapter.SelectByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (CmsNewsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"UpdatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByUpdatedByLST (CmsNewsEntity obj)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByUpdatedByLST (CmsNewsEntity obj,SelectOptions option)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"UpdatedBy",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (string UpdatedBy )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.UpdatedBy = UpdatedBy;  
            return Adapter.SelectByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (string UpdatedBy, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.UpdatedBy = UpdatedBy;  
            return Adapter.SelectByField(obj,"UpdatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByUpdatedByLST (string UpdatedBy )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.UpdatedBy = UpdatedBy;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByUpdatedByLST (string UpdatedBy, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.UpdatedBy = UpdatedBy;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (CmsNewsEntity obj)
        { 
            return Adapter.SelectByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (CmsNewsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"UpdatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByUpdatedDateLST (CmsNewsEntity obj)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectByUpdatedDateLST (CmsNewsEntity obj,SelectOptions option)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"UpdatedDate",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (DateTime UpdatedDate )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.UpdatedDate = UpdatedDate;  
            return Adapter.SelectByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (DateTime UpdatedDate, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.UpdatedDate = UpdatedDate;  
            return Adapter.SelectByField(obj,"UpdatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByUpdatedDateLST (DateTime UpdatedDate )
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.UpdatedDate = UpdatedDate;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate"),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<CmsNewsEntity> SelectByUpdatedDateLST (DateTime UpdatedDate, SelectOptions option)
        { 
            CmsNewsEntity obj = new CmsNewsEntity();
            obj.UpdatedDate = UpdatedDate;  
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate",option),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectWithConditionLST (CmsNewsEntity obj)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new CmsNewsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<CmsNewsEntity></returns>
        public List<CmsNewsEntity> SelectWithConditionLST (CmsNewsEntity obj,SelectOptions option)
        { 
            return  (List<CmsNewsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new CmsNewsEntity());
        }

}
}
